    $(document).ready(function(e) {
		$("#commentform :input").blur(function(e) {
			$parent=$(this).parent();
			$parent.find("span.comments_alert").remove();
			if($(this).is("#author"))
			{
			  if( this.value=="" || this.value.length < 6)
			  {
				$parent.find("span.cologreed").attr("class","colored");
				$parent.append("<span class='comments_alert'>The user name cannot be blank or less than 6</span>");
				
			  }else{
				$parent.find("span").attr("class","cologreed")
				   }
			}
			  if($(this).is("#email"))
			  {
			     if(this.value=="" || ( this.value!="" && !/.+@.+\.[a-zA-Z]{2,4}$/.test(this.value) ) )  
				 {
				 $parent.find("span.cologreed").attr("class","colored");	 
				 $parent.append("<span class='comments_alert'>Email cannot be null or not in the correct format</span>");	 
				 }
				 else{
				$parent.find("span").attr("class","cologreed")
					 }
			  }	
			  if($(this).is("#comment"))
			  {
				if(this.value=="")  
				{
					$parent.append("<span class='comments_alert'>Comments can not be empty</span>");
				}
				else{
				$parent.find("span").attr("class","cologreed")
					 }
			  }			
        }).keyup(function(e) {
            $(this).triggerHandler("blur");
        }).focus(function(e) {
            $(this).triggerHandler("blur");
        });
		$(".coments_submit").click(function(e) {
            if($("#commentform span.colored").length || $("textarea").val()=="")
			{
			alert("The above error");
			return false;}
			else
			alert("Congratulations on your success!");
        });
		
		$("#comment .hover").hover(function(){
			$(this).css("border-left","1px solid #333")},
			function(){
				$(this).css("border-left","1px solid #DFE5E7")
		})

    });
